Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] account_reconciliation_widget: Don't link counterpart to the statement line #619

Conversation

pedrobaeza
Copy link
Member

Backport of #617

Steps to reproduce the problem:

  • Issue an invoice.
  • Add a bank statement for paying such invoice.
  • Reconcile the statement with the invoice. It gets paid.
  • Revert reconciliation from the statement.
  • Go again to reconcile the statement line.

Expected behavior: The invoice is available to be reconciled again.

Current behavior: The invoice is not available.

That's because the move line of the AR/AP account was linked to the statement line in the reconciliation process through the field statement_line_id. That field is used for linking the generated move lines to the generating statement line, not for other things.

This is probably a bad migration from v13 original code to v14, where the reconciliation and the datamodel changed.

It includes a migration script that mitigates a bit the problem on past reconciled invoices, removing such link. It doesn't cover other AR/AP lines, but at least we keep data consistent for these ones.

@Tecnativa TT46644

…atement line

Steps to reproduce the problem:

- Issue an invoice.
- Add a bank statement for paying such invoice.
- Reconcile the statement with the invoice. It gets paid.
- Revert reconciliation from the statement.
- Go again to reconcile the statement line.

Expected behavior: The invoice is available to be reconciled again.

Current behavior: The invoice is not available.

That's because the move line of the AR/AP account was linked to the
statement line in the reconciliation process through the field
`statement_line_id`. That field is used for linking the generated
move lines to the generating statement line, not for other things.

This is probably a bad migration from v13 original code to v14, where
the reconciliation and the datamodel changed.

It includes a migration script that mitigates a bit the problem on
past reconciled invoices, removing such link. It doesn't cover other
AR/AP lines, but at least we keep data consistent for these ones.

TT46644
@pedrobaeza pedrobaeza added this to the 14.0 milestone Jan 2, 2024
@pedrobaeza
Copy link
Member Author

Unrelated CI error with account_mass_reconcile_as_job, so let's merge this manually (as we have version bump) to fix the conflicting behavior.

@pedrobaeza pedrobaeza merged commit 29210db into OCA:14.0 Jan 2, 2024
2 of 4 checks passed
@pedrobaeza pedrobaeza deleted the 14.0-fix-account_reconciliation_widget-stml_link branch January 2, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants